/*
 Copyright To change this template, choose Tools | Templates
 Copyright and open the template in the editor.
 */

package com.click.app.dao.hibernate;


import com.click.app.dao.LaundryItemDao;
import com.click.app.model.LaundryItem;
import java.util.List;

/**
 * @author Joel Chuca Condo
 * @date 17/06/2009
 */
public class LaundryItemDaoHibernate extends GenericDaoHibernate<LaundryItem, Long> implements LaundryItemDao{

    public LaundryItemDaoHibernate(){
        super(LaundryItem.class);
    }
    
    public List<LaundryItem> findByOrderSize(Long idLaundryRequestItem){        
        return getHibernateTemplate().find("from LaundryItem as li where li.laundryRequestItem.id=" +
                idLaundryRequestItem + " order by li.pantDesign.modelSize.valueSize");
    }
}
